<#macro showFieldError fieldName>
<#if fieldErrors?exists>
	<#assign eKeys = fieldErrors.keySet()>
	<#list eKeys as eKey>
		<#if (eKey = fieldName)>
			<#assign eValue = fieldErrors[fieldName]>
			<#list eValue as eEachValue>
				<font color="red">${action.getText(eEachValue)}</font>
			</#list>
		</#if>
	</#list>
</#if>
</#macro>

<#macro showActionMessage>
	<#if actionMessages?exists>
		<#if actionMessages?has_content>
	    	<#list actionMessages as msg>
	    		<font color="red">${action.getText(msg)}</font>
	    	</#list>
		</#if>
	</#if>
</#macro>

<#macro showErrMsg>
	<#assign errorMsg = stack.findValue("errorMsg")?if_exists/>
	<#if errorMsg?exists && errorMsg!=action.getText(errorMsg)>
		${action.getText(errorMsg)}
	<#else>
		系统错误！
	</#if>
</#macro>

<#macro showActionResultMsg divId="Main_handleBar" contentId="op_result_message" isSuccess=true>
	<#assign isDisplay="none"/>
	<#if actionMessages?exists>
		<#if actionMessages?has_content>
			<#assign isDisplay=""/>
		</#if>
	</#if>
	<div class="Main_handleBar <#if isSuccess>check_pass<#else>check_fall</#if>" id="${divId}" style="display:${isDisplay}">
		<div class="Main_handleBar_head"></div>
		<div class="Main_handleBar_body">
			<p id="${contentId}">
				<#if actionMessages?exists>
					<#if actionMessages?has_content>
				    	<#list actionMessages as msg>
				    		<font color="<#if isSuccess>green<#else>red</#if>">${action.getText(msg)}</font>
				    	</#list>
					</#if>
				</#if>
			</p>
		</div>
		<div class="Main_handleBar_foot"><a href="javascript:void(0)" class="close" onclick="closeHandleBar()"></a></div>
  	</div>
  	<script type="text/javascript">
		function closeHandleBar(){
			document.getElementById('${divId}').style.display = "none";
		}  
		function showOpMsg(msg) {
			$('op_result_message').innerHTML = msg;
			$('${divId}').style.display = "";
		}
	</script>
</#macro>
